<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=, initial-scale=1.0">
    <title>登录</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        .title{
            line-height: 40px;
            margin-left: 30px;
            margin-top: 60px;
        }
        .block{
            margin: 30px;
        }
        .block input{
            height: 40px;
            line-height: 40px;
            border: none;
            border-bottom: 1px solid #ccc;
            padding-left: 20px;
            /* border-radius: 5px; */
            width: 100%;
            box-sizing: border-box;
        }
        .login2 input{
            height: 40px;
            line-height: 40px;
            padding-left: 20px;
            border-radius: 20px;
            width: 100%;
            border: none;
            width: 360px;
            margin-left: 30px;
            color: #555;
        }
        .forget{
            width: 80%;
            margin-left: 40px;
            margin-top: 10px;
            display: flex;
            justify-content: space-between;
            align-items: row;
        }
        .forget a{
            text-decoration: none;
            color: deepskyblue;
        }
        .reader{
            display: flex;
            justify-content: flex-start;
            position: absolute;
            bottom: 70px;
        }
        .reader input{
            margin-left: 20px;
            /* display: inline-block;
            vertical-align: baseline; */
        }
        .reader p{
            margin-left: 5px;
            color: #ccc;
            font-size: 14px;
        }
        .reader a{
            text-decoration: none;
            color: deepskyblue;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div id="app">
        <h3 class="title">密码登录</h3>
        <div class="block">
            <input type="text" placeholder="手机/用户名" v-model="form.phone">
        </div>
        <div class="block">
            <input type="password" placeholder="密码" v-model="form.pass">
        </div>
        <div class="login2">
            <input type="button" value="登录" @click="login">
        </div>
        <div class="forget">
            <a href="">手机号登录</a>
            <a href="">忘记密码</a>
        </div>
        <div class="reader">
            <input type="radio"><p>已阅读并同意</p><a href="">《用户服务协议》、《隐私政策》</a>
        </div>
    </div>
</body>
</html>
<script src="../js/vue-2.5.21.js"></script>
<script>
    //实例化Vue对象
    var v = new Vue({
            el:'#app',
            data:{ 
                form:{ phone:'admin', pass:'1234' },
                
            },
            methods:{ //定义方法, 在Vue的任何一个方法内, this都表示当前Vue实例, 每个方法都会自动保存到当前Vue实例身上
                //在每个方法中, 都可以获取data中的响应式数据 , 都可以调用任何其他方法
                login(){
                    console.log( this.form ); //获取data中的数据
                    
                },
                
            }
        })
</script>